This invention pertains to 3D object construction. In particular, this invention pertains to integrated texture mapping, filtering and image geometry displacement.
It is known in the art to computer generate 3D objects, texture them, and project them as a sequence of images on a screen. One way of doing this is with a conventional 3D graphics pipeline. Briefly, a conventional 3D graphics pipeline creates an image by performing the following tasks:
1. A computer model of a geometric surface is created or provided. The computer model can be an array of polygons, described in the computer model in terms of the x, y and z coordinates of its vertices. The polygons are joined together at their edges to form a 3D surface. Alternatively, the computer model can be a set of geometric surfaces that are defined in other ways, e.g. xe2x80x9cimplicitly defined,xe2x80x9d using mathematical equations.
2. A pixel array (or arrays) containing one or more images to be applied to the polygons (or implicitly defined geometric surfaces) as textures is provided. We will refer to this type of pixel array as a xe2x80x9ctexelxe2x80x9d array. We will refer to the individual pixels within the texel array as texels.
3. The texel array is xe2x80x9cboundxe2x80x9d to the polygons or surfaces. In other words, each polygon is associated with a portion of the texel array that contains a description of the appearance (e.g. color, brightness, saturation, a pattern of colors, etc.) that that polygon will exhibit.
4. A 3D graphics pipeline then uses the texel array and computer model of the surface to generate an image. This image is provided as another pixel array that is displayed on a computer monitor or other output device.
While the above-mentioned process is adequate for some purposes, this process is has some shortcomings when one tries to apply certain textures to the computer model of the surface. For example, assume that instead of applying a simple texture contained in a texel array to an object, one tries to apply a pixel array that is a photograph of an object (e.g. a book on a table). The book is, of course, a three-dimensional object. If one simply uses a 3D graphics pipeline to apply such a pixel array to the computer model of the surface, the result will be a surface having a 2D image of a book thereon. In other words, the 3D characteristics of the book will be lost. It would be desirable to preserve the 3D characteristics of 3D objects depicted in a 2D pixel array when applying the pixel array to a computer model of a geometric surface. This would result in the construction of more realistic images to be displayed on a CRT.
A method in accordance with our invention comprises:
a) providing a computer model of a surface;
b) providing a 2D image in the form of a pixel array;
c) providing additional intrinsic information about the 3D characteristics of the 2D image;
d) binding the pixel array to the computer model of the surface; and
e) offsetting the surface within the computer model as a function of additional intrinsic information.
In one embodiment, the surface of the computer model is offset in the Z direction.
In one embodiment, the pixel array contains a representation of a three dimensional object. For example, suppose the pixel array contains a representation of a book on a table. Books have a certain thickness. The computer model of the geometric surface is modified in accordance with above-mentioned additional intrinsic information pertaining to the 3D characteristics of the book. Accordingly, the portion of the geometric surface where the book is to be rendered will appear displaced relative to the rest of the geometric surface. This creates a xe2x80x9c3Dxe2x80x9d appearance for the book.
In one embodiment, the pixel array and modified computer model of the geometric surface are rendered into an image using a 3D graphics pipeline. The 3D graphics pipeline typically receives as inputs information concerning the location and orientation of the geometric surface in a xe2x80x9cworld coordinate system.xe2x80x9d The 3D graphics pipeline also receives as inputs information concerning where a xe2x80x9cvirtual observerxe2x80x9d is to observe the object being rendered, and where a xe2x80x9cvirtual lighting sourcexe2x80x9d is to illuminate the object. The 3D graphics pipeline takes this information and generates a second pixel array corresponding to an image that is to appear on a computer display device such as a CRT. As the orientation of the geometric surface is modified by the 3D graphics pipeline, the 3D characteristics of the pixel array mapped onto the surface are preserved because the computer model of the geometric surface has been modified in accordance with those 3D characteristics. Thus, the resulting image generated by the pipeline will be more realistic.